<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Event flags</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="event.examples.html">« 范例</a></li>
      <li style="float: right;"><a href="event.persistence.html">About event persistence »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.event.html">Event</a></li>
    <li>Event flags</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="event.flags" class="chapter">
 <h1>Event flags</h1>

 <p class="para">
  <strong><code>Event::READ</code></strong>
  This flag indicates an event that becomes active when the provided file
  descriptor (usually a stream resource, or socket) is ready for reading.
 </p>
 <p class="para">
  <strong><code>Event::WRITE</code></strong>
  flag indicates an event that becomes active when the provided file
  descriptor (usually a stream resource, or socket) is ready for writing.
 </p>
 <p class="para">
  <strong><code>Event::SIGNAL</code></strong>
  used to implement signal detection. See &quot;Constructing signal events&quot; below.
 </p>
 <p class="para">
  <strong><code>Event::TIMEOUT</code></strong>
  indicates an event that becomes active after a timeout elapses. The
  <strong><code>Event::TIMEOUT</code></strong>
  flag is ignored when constructing an event: one can either set a timeout
  when event is
  <em class="emphasis">added</em>
  , or not. It is set in the
  <code class="literal">$what</code>
  argument to the callback function when a timeout has occurred.
 </p>
 <p class="para">
  See also
  <a href="http://www.wangafu.net/~nickm/libevent-book/Ref4_event.html#_the_event_flags" class="link external">&raquo;&nbsp;Fast
 portable non-blocking network programming with Libevent, Working with events,
 Event flags</a>
 </p>
</div>
</div></div></body></html>